package com.day1011;

import java.io.BufferedReader;
import java.io.File;
import java.io.FileReader;
import java.util.Arrays;

public class MainText {
    public static void main(String[] args) throws Exception {
        File file = new File("F:\\task\\1.lvl");
        FileReader fileReader = new FileReader(file);
        BufferedReader bufferedReader = new BufferedReader(fileReader);
        String[][] nums = new String[11][11];

//        String line ;
//        int k;
//        int j = 0;
//        while ((line = bufferedReader.readLine()) != null) {
//            k = 0;
//            String[] strs = line.split(",");
////            System.out.println(Arrays.toString(strs));
//            for (int i = 0; i < strs.length; i++) {
//                nums[j][i] = strs[k];
//                k++;
//            }
//            System.out.println(Arrays.toString(nums[j]));
//            j++;
//        }

        String str = null;
        int index = 0;
        while ((str = bufferedReader.readLine()) != null){
            String[] num = str.split(",");
            for (int i = 0; i < num.length; i++) {
                    nums[index][i] = num[i];
            }
            index ++ ;
        }
        fileReader.close();
        bufferedReader.close();
        for (int i = 0; i < nums.length; i++) {
            for (int j = 0; j < nums[i].length; j++) {
                System.out.print(nums[i][j] + " ");
            }
            System.out.println();
        }
    }
}
